<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       function flattenDeep(arr1){
           return arr1.reduce(function(acc,val){
               return Array.isArray(val) ? acc.concat(flattenDeep(val)) : acc.concat(val)
           },[])
       }
       let oarr = flattenDeep([1,2,[3,[6,7]]])
       // 递归函数
       function fac(n){
           if( n == 1){
               return 1
           }
           return n * fac(n-1)
       }
       fac(3)

    </script>
</body>
</html>
